//
//  LCShengJingTextViewController+LoadData.m
//  JKFuYinProject
//
//  Created by admin on 2018/1/8.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LCShengJingTextViewController+LoadData.h"
#import "LCNavigationController.h"

@implementation LCShengJingTextViewController (LoadData)
///刷新数据
-(void)refreshData{
    JKSongsMessStatus *playingSong = [JKSongsMessStatus yy_modelWithJSON:[LCHistoryDataManager loadBibleTextData]];
    
    NSString *str = [NSString stringWithFormat:@"%@",playingSong.title];
    str = [str substringWithinBoundsLeft:@"约" right:@"("];
    str = [str stringByReplacingOccurrencesOfString:@"新约" withString:@""];
    str = [str stringByReplacingOccurrencesOfString:@"旧约" withString:@""];
    if (str == nil) return;
    self.tabNameLabel.attributedText = [[NSAttributedString alloc] initWithString:str];
    [self.nameBtn setTitle:str forState:UIControlStateNormal];
    str = [playingSong.title substringWithinBoundsLeft:@"第" right:@"章"];
    self.numLabel.text = [NSString stringWithFormat:@"第 %@ 章", str];
    [self.countBtn setTitle:str forState:UIControlStateNormal];
    
    [self.bibleTableViewController lrcWordWithID:playingSong];
}

- (void)shengJingMessageCollectionWithTitle:(NSString *)title fuzhiStr:(NSString *)fuzhiStr{
    
    if ([[_UserM usercode] isEqualToString:@""]) {
        pushAccLoginVC
        return;
    }
    LCComposeViewController *composeViewController = [[LCComposeViewController alloc] init];
    composeViewController.navigationItem.title = @"评论";
    composeViewController.shengJingTitle = title;
    composeViewController.notesContentStr = fuzhiStr;
    composeViewController.selectedData = self.bibleTableViewController.selectedData;
    
    LCNavigationController *navController = [[LCNavigationController alloc] initWithRootViewController:composeViewController];
    [self presentViewController:navController animated:YES completion:nil];
    
    NSLog(@"进入圣经感悟页");
}

@end
